#-*- encoding: utf-8

import importlib
import pyglet
from pyglet.window import key

import render

window = pyglet.window.Window(width=640, height=480)
label = pyglet.text.Label("press 'R' to restart", x=0,y=window.height-20) 

@window.event
def on_draw():
    window.clear()
    label.draw()
    render.draw(window)

@window.event
def on_key_press(symbol, modifiers):
    if symbol == key.R:
        importlib.reload(render)


pyglet.app.run()


